{% if object_list %}
  <div class="jellyroll_photo_gallery">
    {% for photo in object_list %}<img src="{{ photo.small_url }}" title="{{ photo.title|escape }}" alt="Flickr photo">{% endfor %}
  </div>
{% else %}
  <div class="jellyroll_photo">
    <img src="{{ object.small_url }}" title="{{ object.title|escape }}" alt="Flickr photo">
  </div>
{% endif %}